package com.xhwl.data.service;

import com.xhwl.common.es.EsPage;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.OperateLog;
import com.xhwl.starter.log.LogQuery;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/**
 * @Author JCccc
 * @Description
 * @Date 2021/6/29 16:28
 */

@RestController
public interface ILogService {

    /**
     * 日志管理 日志列表查询 （操作日志、系统日志）
     *
     * @param logQuery
     * @return
     */
    EsPage getPageList(LogQuery logQuery);


    /**
     * 新增操作日志
     *
     * @param operateLog
     * @return
     */
    @PostMapping(value = "/log-service/create-operate-log")
    ResultJson addOperateLog(@RequestPart("operateLog") OperateLog operateLog);


    /**
     * 导出日志
     *
     * @param response
     * @param logQuery
     * @param pageList
     * @return
     */
    void exportLog(HttpServletResponse response, LogQuery logQuery, EsPage pageList) throws IOException;

    /**
     * 登录日志分页
     *
     * @param appId
     * @param industryId
     * @param envId
     * @param query
     * @return
     */
    EsPage pageLoginLog(String appId, Short industryId, Integer envId, LogQuery query);
}

